var MiniSite=new Object();
MiniSite.Browser={
	ie:/msie/.test(window.navigator.userAgent.toLowerCase()),
	moz:/gecko/.test(window.navigator.userAgent.toLowerCase()),
	opera:/opera/.test(window.navigator.userAgent.toLowerCase()),
	safari:/safari/.test(window.navigator.userAgent.toLowerCase())
};
MiniSite.fun=function(s){
	return(typeof s=='object')?s:document.getElementById(s);
};
MiniSite.JsLoader={
	load:function(sUrl,fCallback){
		var _script=document.createElement('script');
		
		_script.setAttribute('type','text/javascript');
		 _script.setAttribute('src', sUrl+'?='+Math.random());     
		 _script.setAttribute('charset','gb2312');
		document.getElementsByTagName('head')[0].appendChild(_script);
		if(MiniSite.Browser.ie){
			_script.onreadystatechange=function(){
				if(this.readyState=='loaded'||this.readyStaate=='complete'){
					fCallback();
				}
			};
		}else if(MiniSite.Browser.moz){
			_script.onload=function(){
				fCallback();
			};
		}else{
			fCallback();
		}
	}
};
MiniSite.Cookie={
	set:function(name,value,expires,path,domain){
		if(typeof expires=="undefined"){
			expires=new Date(new Date().getTime()+24*3600*1000);
		}
		document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"; path=/")+((domain)?";domain="+domain:"");
	},
	get:function(name){
		var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|n)"));
		if(arr!=null){
			return unescape(arr[2]);
		}
		return null;
	},
	clear:function(name,path,domain){
		if(this.get(name)){
			document.cookie=name+"="+((path)?"; path="+path:"; path=/")+((domain)?"; domain="+domain:"")+";expires=Fri, 02-Jan-1970 00:00:00 GMT";
		}
	}
};
MiniSite.Home={
	defaultprovince:4,
	timelapse:null,
	Provinc:{"北京市":4,"上海市":28,"天津市":5,"重慶市":19,"香港":32,"澳門":33,"台灣省":31,"雲南省":20,"內蒙古":9,"吉林省":2,"四川省":18,"寧夏":14,"安徽省":26,"山東省":8,"山西省":15,"廣東省":0,"廣西":22,"新疆":10,"江蘇省":17,"江西省":27,"河北省":6,"河南省":7,"浙江省":29,"海南省":23,"湖北省":25,"湖南省":24,"甘肅省":12,"福建省":30,"西藏":11,"貴州省":21,"遼寧省":3,"陝西省":16,"青海":13,"黑龍江省":1},

	insertFlash:function(elm,url,w,h){
		if(!document.getElementById(elm))
			return;
		var str='';
		str+='<object width="'+w+'" height="'+h+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">';
		str+='<param name="movie" value="'+url+'">';
		str+='<param name="wmode" value="transparent">';
		str+='<param name="quality" value="autohigh">';
		str+='<param name="allowScriptAccess" value="always" > ';
		str+='<embed width="'+w+'" height="'+h+'" src="'+url+'" quality="autohigh" wmode="opaque" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
		str+='</object>';
		document.getElementById(elm).innerHTML=str;
	},
	_ip:"",
	_print:function(province){
		try{setdef();}catch(e){}
	},
	print:function(){
		var ok=function(){
			MiniSite.Home._print();
		}

	}
}
	window.onerror = function()
	{
		return true;
	}
function loadJS(url,load)
{
	var _script = document.createElement('script');
	_script.setAttribute('type','text/javascript');
	_script.setAttribute('src',url);
	document.getElementsByTagName('head')[0].appendChild(_script);
	if(!load)	return;
	if(document.all){
		_script.onreadystatechange = function(){
			if (this.readyState=='loaded' || this.readyState=='complete')
			{
				load();
			}
		};
	}else{
		_script.onload = function(){
			load();
		};
	}
}